#MAKE FILE FOR CodeXLGpuProfiler
PROJECT_NAME=rcprof
DEPTH = ../..
include $(DEPTH)/Build/Linux/Common.mk

TARGET = $(OUTPUT_BIN_DIR)/$(PROJECT_NAME)$(TARGET_SUFFIX)

ADDL_DEFINES = -DNON_BLOCKING_TIMEOUT -DAMD_INTERNAL_BUILD
ADDL_CFLAGS = $(HSAFDN_CFLAGS)
ADDL_LINKFLAGS = -Wl,--export-dynamic $(BOOST_DEFINES) -Wl,--unresolved-symbols=ignore-in-shared-libs

INCLUDES = \
	-I./ \
	-I$(SRC_COMMON_DIR) \
	-I$(SRC_CLCOMMON_DIR) \
	-I$(COMMON_PROJ_DIR) \
	-I$(DEVICEINFO_DIR) \
	-isystem$(BOOST_DIR) \
	-isystem$(CAL_DIR)/include \
	-isystem$(APPSDK_DIR)/include \
	-isystem$(HSA_DIR)/include \
	-isystem$(HSA_DIR)/include/hsa \
	-I$(DYNAMICLIBRARYMODULE_DIR) \
	-I$(TSINGLETON_DIR) \
	-I$(UTF8CPP_DIR) \
	-I$(GPU_PERF_API_DIR) \
	-I$(ADL_DIR)/include \
	-I$(HSAUTILS_DIR)

STATIC_LIBS = \
	$(BOOST_LIB_DIR)/libboost_chrono.a \
	$(BOOST_LIB_DIR)/libboost_date_time.a \
	$(BOOST_LIB_DIR)/libboost_filesystem.a \
	$(BOOST_LIB_DIR)/libboost_program_options.a \
	$(BOOST_LIB_DIR)/libboost_system.a \
	$(BOOST_LIB_DIR)/libboost_thread.a \
	$(BOOST_LIB_DIR)/libboost_wave.a

LIBPATH = $(COMMON_LIB_PATHS)

ifneq ("$(wildcard $(OUTPUT_LIB_DIR)/lib$(GPU_PROFILER_LIB_PREFIX)HSAUtils$(TARGET_SUFFIX).a)","")
	LOCAL_HSAUTILS_LIBS := $(HSAUTILS_LIBS)
endif

LIBS = \
	$(CLCOMMON_LIBS) \
	$(COMMON_LIBS) \
	$(FRAMEWORK_LIBS) \
	$(STANDARD_LIBS) \
	$(LOCAL_HSAUTILS_LIBS)

OBJS = \
	./$(OBJ_DIR)/Main.o \
	./$(OBJ_DIR)/Analyze.o \
	./$(OBJ_DIR)/ParseCmdLine.o \
	./$(OBJ_DIR)/OccupancyChart.o \
	./$(OBJ_DIR)/OccupancyUtils.o \
	./$(OBJ_DIR)/AnalyzerHTMLUtils.o \
	./$(OBJ_DIR)/APISummarizer.o \
	./$(OBJ_DIR)/CLContextSummarizer.o \
	./$(OBJ_DIR)/CLKernelSummarizer.o \
	./$(OBJ_DIR)/CLMemSummarizer.o \
	./$(OBJ_DIR)/CLObjRefTracker.o \
	./$(OBJ_DIR)/CLAPIAnalyzer.o \
	./$(OBJ_DIR)/CLAPIRules.o \
	./$(OBJ_DIR)/SimpleCLAPIRuleManager.o \
	./$(OBJ_DIR)/CLRetCodeAnalyzer.o \
	./$(OBJ_DIR)/CLDeprecatedFunctionAnalyzer.o \
	./$(OBJ_DIR)/CLDataTransferAnalyzer.o \
	./$(OBJ_DIR)/CLSyncAnalyzer.o \
	./$(OBJ_DIR)/CLAtpFile.o \
	./$(OBJ_DIR)/HSAAtpFile.o \
	./$(OBJ_DIR)/HSAAPIAnalyzer.o \
	./$(OBJ_DIR)/HSARetCodeAnalyzer.o \
	./$(OBJ_DIR)/HSARetCodeAnalyzerHelper.o \
	./$(OBJ_DIR)/HSAObjRefTracker.o \
	./$(OBJ_DIR)/HSAKernelSummarizer.o \
	./$(OBJ_DIR)/HSAFunctionDefsUtils.o \
	./$(OBJ_DIR)/HSAMemSummarizer.o \
	./$(OBJ_DIR)/AtpFile.o \
	./$(OBJ_DIR)/PerfMarkerAtpFile.o \
	./$(OBJ_DIR)/CLOccupancyFile.o \
	./$(OBJ_DIR)/StackTraceAtpFile.o \
	./$(OBJ_DIR)/ADLUtil.o \
	./$(OBJ_DIR)/GPUPerfAPICounterLoader.o \
	./$(OBJ_DIR)/CSVFileMerger.o \
	./$(OBJ_DIR)/KernelProfileResultParser.o \

include $(DEPTH)/Build/Linux/CommonTargets.mk

$(OBJ_DIR)/%.o: ../sanalyze/AutoGenerated/%.cpp
	$(BUILD_SRC)

# END OF MAKE FILE
